package kr.co.sdsway2.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

public class SW2MainController implements Controller {

	protected final Log logger = LogFactory.getLog(getClass());
	
	@Override
	public ModelAndView handleRequest(HttpServletRequest req,
			HttpServletResponse res) throws Exception {
	
		logger.info("Returning hello view");
        logger.info("파라미터: "+req.getParameter("aa"));
        req.setAttribute("aa", req.getParameter("aa"));
        ModelAndView mav = new ModelAndView("hello.jsp");
        mav.addObject("bb", "bb");
        
		return null;
	}
	

	
}
